package com.example.ccj.b.c.form;

import android.graphics.Color;

import androidx.annotation.ColorInt;

import com.luck.picture.lib.entity.LocalMedia;

import java.util.List;
import java.util.Objects;

/**
 * 表单字段配置
 * @author 驰珺
 * whechat   : chijun9
 * create at : 2024/6/26 12:25
 */
public class FieldConfig {
    String dataName;
    String fieldName;
    String hint;
    int maxLength = 255;
    int textSize = 15;
    boolean isNoNull = false;
    boolean isOnlySelect = false;
    boolean isCanModify = true;
    CharSequence text;
    int order;
    @ColorInt
    int hintTextColor = Color.parseColor("#686868");
    @ColorInt int errorTextColor = Color.parseColor("#F44336");
    @ColorInt int inputTextColor = Color.parseColor("#000000");
    @ColorInt int inputTextEnabledFalseColor = Color.parseColor("#838383");
    //图片
    List<LocalMedia> localMediaList;
    Object[] option;
    @MFormField.Type int type;
    OptionFormatter optionFormatter;
    TextChange textChange;
    String superF;//关联的上级字段name.0;


    public String getSuperF() {
        return superF;
    }

    public void setSuperF(String superF) {
        this.superF = superF;
    }

    public String getDataName() {
        return dataName;
    }

    public void setDataName(String dataName) {
        this.dataName = dataName;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public int getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(int maxLength) {
        this.maxLength = maxLength;
    }

    public int getTextSize() {
        return textSize;
    }

    public void setTextSize(int textSize) {
        this.textSize = textSize;
    }

    public boolean isNoNull() {
        return isNoNull;
    }

    public void setNoNull(boolean noNull) {
        isNoNull = noNull;
    }

    public boolean isOnlySelect() {
        return isOnlySelect;
    }

    public void setOnlySelect(boolean onlySelect) {
        isOnlySelect = onlySelect;
    }

    public boolean isCanModify() {
        return isCanModify;
    }

    public void setCanModify(boolean canModify) {
        isCanModify = canModify;
    }

    public CharSequence getText() {
        return text;
    }

    public void setText(CharSequence text) {
        this.text = text;
    }

    public long getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public int getHintTextColor() {
        return hintTextColor;
    }

    public void setHintTextColor(int hintTextColor) {
        this.hintTextColor = hintTextColor;
    }

    public int getErrorTextColor() {
        return errorTextColor;
    }

    public void setErrorTextColor(int errorTextColor) {
        this.errorTextColor = errorTextColor;
    }

    public int getInputTextColor() {
        return inputTextColor;
    }

    public void setInputTextColor(int inputTextColor) {
        this.inputTextColor = inputTextColor;
    }

    public int getInputTextEnabledFalseColor() {
        return inputTextEnabledFalseColor;
    }

    public void setInputTextEnabledFalseColor(int inputTextEnabledFalseColor) {
        this.inputTextEnabledFalseColor = inputTextEnabledFalseColor;
    }

    public List<LocalMedia> getLocalMediaList() {
        return localMediaList;
    }

    public void setLocalMediaList(List<LocalMedia> localMediaList) {
        this.localMediaList = localMediaList;
    }

    public String getHint() {
        return hint;
    }

    public void setHint(String hint) {
        this.hint = hint;
    }

    public Object[] getOption() {
        return option;
    }

    public void setOption(Object[] option) {
        this.option = option;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public OptionFormatter getOptionFormatter() {
        return optionFormatter;
    }

    public void setOptionFormatter(OptionFormatter optionFormatter) {
        this.optionFormatter = optionFormatter;
    }

    public TextChange getTextChange() {
        return textChange;
    }

    public void setTextChange(TextChange textChange) {
        this.textChange = textChange;
    }

    @Override
    public String toString() {
        return "FieldConfig{" +
                "dataName='" + dataName + '\'' +
                ", fieldName='" + fieldName + '\'' +
                ", maxLength=" + maxLength +
                ", textSize=" + textSize +
                ", isNoNull=" + isNoNull +
                ", isOnlySelect=" + isOnlySelect +
                ", isCanModify=" + isCanModify +
                ", text=" + text +
                ", order=" + order +
                ", hintTextColor=" + hintTextColor +
                ", errorTextColor=" + errorTextColor +
                ", inputTextColor=" + inputTextColor +
                ", inputTextEnabledFalseColor=" + inputTextEnabledFalseColor +
                ", localMediaList=" + localMediaList +
                ", option=" + option +
                ", type=" + type +
                ", optionFormatter=" + optionFormatter +
                ", superF='" + superF + '\'' +
                '}';
    }
}
